package com.loe.ktui

/**
 * Ui容器
 *
 * @author 章路顺
 * @since 2022/9/30-15:27
 */
open class UiGroup(id: String? = null) : UiView(id)
{
    open var gravity: Int? = null

    open val childs = ArrayList<UiView>()

    fun addChild(v: UiView)
    {
        childs.add(v)
    }

    fun addChilds(vararg vs: UiView)
    {
        childs.addAll(vs)
    }
}

//fun Any.ui_Group(id: String? = null, block: (UiGroup.() -> Unit)? = null): UiGroup
//{
//    val ui = UiGroup(id)
//    block?.let { ui.it() }
//    if (this is UiGroup) addChild(ui)
//    return ui
//}